1. Field of the Invention
The present invention relates to video signal processing. More particularly, the present invention related to a method and apparatus for filtering a digital video signal prior to performing DCT and Quantization operations on the resultant signal.
2. The Background Art
In order to minimize the bandwidth required when transmitting video signals from one location to another, the video signals are often compressed to decrease the amount of data that will later be transmitted over a band width limited transmission path.
Many compression routines exist today which use Discrete Cosine Transform (DCT) and Quantization operations known to those of ordinary skill in the art. Some of these compression routines include various forms of MPEG compression such as MPEG-I, MPEG-II, and MPEG-4, and other compression routines such as H.261, and H.263.
Reference designations appearing in more than one figure are intended to refer to substantially similar structures. Effort is made to identify differences between figures, if any.
FIG. 1 is a schematic diagram of a generalized video processing system.
Referring to FIG. 1, video source 10 provides a video signal to source driver 14 which converts the RGB signal out of source 12 into YUV format. YUV is a digital representation well known to those of ordinary skill in the art.
The output of driver 14 is then processed by digital signal processor (DSP) 16, and either processed by display driver 18 to be displayed on display 20, or to be sent to a transmitting station over transmission lines 22.
The processing performed by DSP 16 can be as simple as compressing the video for transmission over transmission lines 22, or may also involve filtering to counter adverse effects inherent in the compression routine which cause the output signal to be inaccurately reproduced when decompression and display take place within a receiving station.
Briefly, between two images, motion compensation techniques are used to find image residue, which has smaller than expected values than the original image. The residue image is then transformed using DCT. DCT is a transform well known to those of ordinary skill in the art.
In order to digitize and achieve a satisfactory compression, DCT coefficients are quantized before Huffman Coding. However, the combination of quantization and DCT causes ringing and other artifacts in the reconstructed images, especially when the quantization step is large.
To reduce these artifacts, filters can be applied during the coding and decoding processes. Several in-loop filters have been introduced in video coding standards.
Two compression algorithms in common use in the video processing, and which utilize filtering schemes, are H.261 and H.263. These two filtering schemes will be briefly described, and their respective disadvantages noted.
FIG. 2 is a schematic diagram of a prior art DSP using the H.261 algorithm and in-loop filtering.
Referring to FIG. 2, an incoming video signal is provided into DSP 16 to a difference apparatus 30 which computes the pixel-by-pixel difference between the incoming data block and the previous data block, providing the output signal through a switch 32 to a DCT apparatus 34.
DCT apparatus 34 performs DCT operations, operations which are required for all forms of MPEG, H.261, and H.263 compression. DCT operations and the specific requirements of MPEG compression are well-known to persons of ordinary skill in the art.
Following DCT operations, the output of DCT apparatus 34 is provided to quantizer 36 where quantizing steps well known to those of ordinary skill in the art are performed. The output of quantizer 36 is provided to transmission path 22 (FIG. 1), and also to inverse quantizer 38. As described earlier, the signal provided to transmission path 22 is provided over long distances to a receiver which decompresses the signal into a display frame, and then provides that display frame to a display device (receiver and display device not shown).
Inverse quantizer 38 and inverse DCT apparatus 40 together invert the compression previously accomplished, and provide the resulting signal to a summing apparatus 42, the output of which is provided to picture buffer 44, the output of which is then filtered by filter 46.
Depending on the condition of switch 48, the output of filter 46 is provided either to summing apparatus 42, or to difference apparatus 30.
Switches 32 and 48 are ganged switches controlled by coding controller 50. If both of switches 32 and 48 are in position "A", the system operates on previously stored data, filtering the data already present in picture buffer 44, passing it through the DCT and Quantization apparatus, and back thru the inverse quantization apparatus and the inverse DCT apparatus 40, and back into picture buffer 44. In this mode, difference apparatus 30 and summing apparatus 42 are bypassed, since there is no comparison needing to be made with a previous block of video data.
Alternatively, if both of switches 32 and 48 are in position "B", DSP 16 accepts new video data, compares, using difference apparatus 30, new image data to old data which has been previously stored and then filtered, and then performs DCT and Quantization functions on the result.
When switches 32 and 48 are in position "B", thus switching filter 46 into the processing path, reconstructed images are filtered, resulting in smoother images as well as less data required to be transmitted over transmission lines 22. However, a significant drawback of this prior art filtering solution is that the filter coefficients are fixed, and therefore there is little or no flexibility to change the filtering based upon the type of images arriving from the external environment to difference apparatus 30. Thus, filter 46 only has on-off control.
FIG. 3 is a schematic diagram of a prior art DSP using the H.263 algorithm and in-loop filtering.
Referring to FIG. 3, DSP 16 comprises the same features and structures as the apparatus of FIG. 2, except for the absence of filter 46 from FIG. 2, and the presence of new filter 60 in FIG. 3.
The apparatus of FIG. 3 functions substantially similarly to the apparatus of FIG. 2, except for the difference in the filtering. Filter 60 in FIG. 3 is commonly used by those of ordinary skill in the art. Although filter 60 is similar to filter 46 of FIG. 2, filter 60 filters video data prior to that data entering picture buffer 44.
A filter 60 as used with the H.263 algorithm, as is known to those of ordinary skill in the art, is a block-edge filter applied on reconstructed data to reduce blocking artifacts. The filtering strength is fixed, but the active region is controlled on the quantization steps.
In each of the FIG. 2 and FIG. 3 cases, the filters function as intended. However, in both cases, the encoder and decoder must each have the same ones of the filters, in order for the decoded image to be properly viewed. For example, if a filter 46 is used, both encoder and decoder must have that filter 46. Alternatively, if a filter 60 is used, both encoder and decoder must have that filter 60.
A second drawback of the prior art filters is that one or more filter coefficients are fixed, rather than being variable which would add flexibility.
The present invention solves both of these problems by providing a filter that is utilized prior to DCT and quantization operations, and which does not have to be duplicated in the decoder apparatus.